What if we could design a language expressly for MC and QMC simulations - what would it look like? As a first step, let's put programming in the context of solving the whole problem.
Steps to solve a computational science problem
- Define the problem (ask the question)
- Write down the equations modeling the system under investigation
- Using mathematical transformations and approximations, reduce the equations to a solvable form (numerical analysis)
- Convert into a computer program and run it
- Undertake verification (are steps 2,3, and 4 correct) and validation (are step 1 and the approximations in step 2 correct)
Developing techniques for managing each of the steps would be a great help. Current programming languages only deal with step 4. Computer algebra systems (Mathematica, Maple, Maxima, etc) can help with steps 2 and 3, but don't really help in making the jump to a large scale program.
Currently the transformations from steps 2 through 4 are done by hand. I know I make many mistakes in this process. It would be a boon to my productivity if the computer could verify that all the minus signs and factors of 2 are correct.
The verification step often involves understanding the effects of various approximations in step 3. If the program is described as a series of transformations on the equations, hopefully changing the approximation would be a simple change to the equations, and the rest of the process would automatically generate a correct program. This would make it easier to test approximations.
This doesn't say much about the ideal programming language, but it does give some idea of the problem to be solved. I'll have more to say about the ideal programming language later.